package com.ftg.learn.chapter02;

/**
 * 复习
 *
 * @author kangjx
 * @version 1.0
 * @date 2023/4/23 上午9:58
 */
public class Demo1 {


    static int b;

    int x;

    public void te1(){
        int a;
//        java强类型 []int double
        int[] as = new int[34];
        for (int i = 0; i < as.length; i++) {
            System.out.println(as[i]);
        }
    }

    public static int add(int... z){
        b = 34;

        Demo1 d1 = new Demo1();

        int sum = 0;
        for(int i = 0;i < z.length;i++){
            sum += z[i];
        }
        //区别是什么 ?
        return sum;
    }

    public static void main(String[] args) {
        int sum = add(1, 2, 3, 4,50);

        System.out.println(sum);
    }
}
